package com.fr.base.core.antlr.preprocessor;

import com.fr.base.core.antlr.ANTLRHashString;
import com.fr.base.core.antlr.ANTLRStringBuffer;
import com.fr.base.core.antlr.ByteBuffer;
import com.fr.base.core.antlr.CharBuffer;
import com.fr.base.core.antlr.CharScanner;
import com.fr.base.core.antlr.CharStreamException;
import com.fr.base.core.antlr.CharStreamIOException;
import com.fr.base.core.antlr.InputBuffer;
import com.fr.base.core.antlr.LexerSharedInputState;
import com.fr.base.core.antlr.NoViableAltForCharException;
import com.fr.base.core.antlr.RecognitionException;
import com.fr.base.core.antlr.Token;
import com.fr.base.core.antlr.TokenStream;
import com.fr.base.core.antlr.TokenStreamException;
import com.fr.base.core.antlr.TokenStreamIOException;
import com.fr.base.core.antlr.TokenStreamRecognitionException;
import com.fr.base.core.antlr.collections.impl.BitSet;
import java.io.InputStream;
import java.io.Reader;
import java.util.Hashtable;

public class PreprocessorLexer extends CharScanner
  implements PreprocessorTokenTypes, TokenStream
{
  public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
  public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
  public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
  public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
  public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
  public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
  public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
  public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
  public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
  public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
  public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());

  public PreprocessorLexer(InputStream paramInputStream)
  {
    this(new ByteBuffer(paramInputStream));
  }

  public PreprocessorLexer(Reader paramReader)
  {
    this(new CharBuffer(paramReader));
  }

  public PreprocessorLexer(InputBuffer paramInputBuffer)
  {
    this(new LexerSharedInputState(paramInputBuffer));
  }

  public PreprocessorLexer(LexerSharedInputState paramLexerSharedInputState)
  {
    super(paramLexerSharedInputState);
    this.caseSensitiveLiterals = true;
    setCaseSensitive(true);
    this.literals = new Hashtable();
    this.literals.put(new ANTLRHashString("public", this), new Integer(18));
    this.literals.put(new ANTLRHashString("class", this), new Integer(8));
    this.literals.put(new ANTLRHashString("throws", this), new Integer(23));
    this.literals.put(new ANTLRHashString("catch", this), new Integer(26));
    this.literals.put(new ANTLRHashString("private", this), new Integer(17));
    this.literals.put(new ANTLRHashString("extends", this), new Integer(10));
    this.literals.put(new ANTLRHashString("protected", this), new Integer(16));
    this.literals.put(new ANTLRHashString("returns", this), new Integer(21));
    this.literals.put(new ANTLRHashString("tokens", this), new Integer(4));
    this.literals.put(new ANTLRHashString("exception", this), new Integer(25));
  }

  public Token nextToken()
    throws TokenStreamException
  {
    Token localToken = null;
    Object localObject = null;
    int i = 0;
    resetText();
    try
    {
      while (true)
      {
        switch (LA(1))
        {
        case ':':
          mRULE_BLOCK(true);
          localToken = this._returnToken;
          break;
        case '\t':
        case '\n':
        case '\r':
        case ' ':
          mWS(true);
          localToken = this._returnToken;
          break;
        case '/':
          mCOMMENT(true);
          localToken = this._returnToken;
          break;
        case '{':
          mACTION(true);
          localToken = this._returnToken;
          break;
        case '"':
          mSTRING_LITERAL(true);
          localToken = this._returnToken;
          break;
        case '\'':
          mCHAR_LITERAL(true);
          localToken = this._returnToken;
          break;
        case '!':
          mBANG(true);
          localToken = this._returnToken;
          break;
        case ';':
          mSEMI(true);
          localToken = this._returnToken;
          break;
        case ',':
          mCOMMA(true);
          localToken = this._returnToken;
          break;
        case '}':
          mRCURLY(true);
          localToken = this._returnToken;
          break;
        case ')':
          mRPAREN(true);
          localToken = this._returnToken;
          break;
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '_':
        case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':
          mID_OR_KEYWORD(true);
          localToken = this._returnToken;
          break;
        case '=':
          mASSIGN_RHS(true);
          localToken = this._returnToken;
          break;
        case '[':
          mARG_ACTION(true);
          localToken = this._returnToken;
          break;
        case '\11':
        case '\f':
        case '\14':
        case '\15':
        case '\16':
        case '\17':
        case '\18':
        case '\19':
        case '\20':
        case '\21':
        case '\22':
        case '\23':
        case '\24':
        case '\25':
        case '\26':
        case '\27':
        case '\28':
        case '\29':
        case '\30':
        case '\31':
        case '#':
        case '$':
        case '%':
        case '&':
        case '(':
        case '*':
        case '+':
        case '-':
        case '.':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
        case '<':
        case '>':
        case '?':
        case '@':
        case '\\':
        case ']':
        case '^':
        case '`':
        case '|':
        default:
          if ((LA(1) == '(') && (_tokenSet_0.member(LA(2))))
          {
            mSUBRULE_BLOCK(true);
            localToken = this._returnToken;
          }
          else if (LA(1) == '(')
          {
            mLPAREN(true);
            localToken = this._returnToken;
          }
          else if (LA(1) == 65535)
          {
            uponEOF();
            this._returnToken = makeToken(1);
          }
          else
          {
            throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
          }
        }
        if (this._returnToken != null)
          break;
      }
      i = this._returnToken.getType();
      i = testLiteralsTable(i);
      this._returnToken.setType(i);
      return this._returnToken;
    }
    catch (RecognitionException localRecognitionException)
    {
      throw new TokenStreamRecognitionException(localRecognitionException);
    }
    catch (CharStreamException localCharStreamException)
    {
      if (localCharStreamException instanceof CharStreamIOException)
        throw new TokenStreamIOException(((CharStreamIOException)localCharStreamException).io);
      throw new TokenStreamException(localCharStreamException.getMessage());
    }
  }

  public final void mRULE_BLOCK(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    int k;
    Token localToken = null;
    int j = this.text.length();
    int i = 22;
    match(':');
    if ((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2))))
    {
      k = this.text.length();
      mWS(false);
      this.text.setLength(k);
    }
    else
    {
      if (_tokenSet_2.member(LA(1)))
        break label116:
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    }
    label116: mALT(false);
    switch (LA(1))
    {
    case '\t':
    case '\n':
    case '\r':
    case ' ':
      k = this.text.length();
      mWS(false);
      this.text.setLength(k);
      break;
    case ';':
    case '|':
      break;
    default:
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    }
    while (true)
      while (true)
      {
        if (LA(1) != '|')
          break label474;
        match('|');
        if ((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2))))
        {
          k = this.text.length();
          mWS(false);
          this.text.setLength(k);
        }
        else
        {
          if (_tokenSet_2.member(LA(1)))
            break label350:
          throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
        }
        label350: mALT(false);
        switch (LA(1))
        {
        case '\t':
        case '\n':
        case '\r':
        case ' ':
          k = this.text.length();
          mWS(false);
          this.text.setLength(k);
        case ';':
        case '|':
        }
      }
    throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    label474: match(';');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mWS(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 33;
    int k = 0;
    while (true)
    {
      if (LA(1) == ' ')
      {
        match(' ');
      }
      else if (LA(1) == '\t')
      {
        match('\t');
      }
      else if ((LA(1) == '\n') || (LA(1) == '\r'))
      {
        mNEWLINE(false);
      }
      else
      {
        if (k >= 1)
          break;
        throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
      }
      ++k;
    }
    i = -1;
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  protected final void mALT(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 27;
    while ((_tokenSet_3.member(LA(1))) && (LA(2) >= '\3') && (LA(2) <= 255))
      mELEMENT(false);
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mSUBRULE_BLOCK(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 6;
    match('(');
    if ((_tokenSet_1.member(LA(1))) && (_tokenSet_0.member(LA(2))))
    {
      mWS(false);
    }
    else
    {
      if (_tokenSet_0.member(LA(1)))
        break label98:
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    }
    label98: mALT(false);
    while ((_tokenSet_4.member(LA(1))) && (_tokenSet_0.member(LA(2))))
    {
      switch (LA(1))
      {
      case '\t':
      case '\n':
      case '\r':
      case ' ':
        mWS(false);
        break;
      case '|':
        break;
      default:
        throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
      }
      match('|');
      if ((_tokenSet_1.member(LA(1))) && (_tokenSet_0.member(LA(2))))
      {
        mWS(false);
      }
      else
      {
        if (_tokenSet_0.member(LA(1)))
          break label308:
        throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
      }
      label308: mALT(false);
    }
    switch (LA(1))
    {
    case '\t':
    case '\n':
    case '\r':
    case ' ':
      mWS(false);
      break;
    case ')':
      break;
    default:
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    }
    match(')');
    if ((LA(1) == '=') && (LA(2) == '>'))
      match("=>");
    else if (LA(1) == '*')
      match('*');
    else if (LA(1) == '+')
      match('+');
    else if (LA(1) == '?')
      match('?');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  protected final void mELEMENT(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 28;
    switch (LA(1))
    {
    case '/':
      mCOMMENT(false);
      break;
    case '{':
      mACTION(false);
      break;
    case '"':
      mSTRING_LITERAL(false);
      break;
    case '\'':
      mCHAR_LITERAL(false);
      break;
    case '(':
      mSUBRULE_BLOCK(false);
      break;
    case '\n':
    case '\r':
      mNEWLINE(false);
      break;
    default:
      if (_tokenSet_5.member(LA(1)))
        match(_tokenSet_5);
      else
        throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    }
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mCOMMENT(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 35;
    if ((LA(1) == '/') && (LA(2) == '/'))
      mSL_COMMENT(false);
    else if ((LA(1) == '/') && (LA(2) == '*'))
      mML_COMMENT(false);
    else
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    i = -1;
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mACTION(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 7;
    match('{');
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              while (true)
              {
                if (LA(1) == '}')
                  break label276:
                if (((LA(1) != '\n') && (LA(1) != '\r')) || (LA(2) < '\3') || (LA(2) > 255))
                  break;
                mNEWLINE(false);
              }
              if ((LA(1) != '{') || (LA(2) < '\3') || (LA(2) > 255))
                break;
              mACTION(false);
            }
            if ((LA(1) != '\'') || (!(_tokenSet_6.member(LA(2)))))
              break;
            mCHAR_LITERAL(false);
          }
          if ((LA(1) != '/') || ((LA(2) != '*') && (LA(2) != '/')))
            break;
          mCOMMENT(false);
        }
        if ((LA(1) != '"') || (LA(2) < '\3') || (LA(2) > 255))
          break;
        mSTRING_LITERAL(false);
      }
      if ((LA(1) < '\3') || (LA(1) > 255) || (LA(2) < '\3') || (LA(2) > 255))
        break;
      matchNot(65535);
    }
    label276: match('}');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mSTRING_LITERAL(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 39;
    match('"');
    while (true)
    {
      while (LA(1) == '\\')
        mESC(false);
      if (!(_tokenSet_7.member(LA(1))))
        break;
      matchNot('"');
    }
    match('"');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mCHAR_LITERAL(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 38;
    match('\'');
    if (LA(1) == '\\')
      mESC(false);
    else if (_tokenSet_8.member(LA(1)))
      matchNot('\'');
    else
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    match('\'');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  protected final void mNEWLINE(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 34;
    if ((LA(1) == '\r') && (LA(2) == '\n'))
    {
      match('\r');
      match('\n');
      newline();
    }
    else if (LA(1) == '\r')
    {
      match('\r');
      newline();
    }
    else if (LA(1) == '\n')
    {
      match('\n');
      newline();
    }
    else
    {
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    }
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mBANG(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 19;
    match('!');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mSEMI(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 11;
    match(';');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mCOMMA(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 24;
    match(',');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mRCURLY(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 15;
    match('}');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mLPAREN(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 29;
    match('(');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mRPAREN(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 30;
    match(')');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mID_OR_KEYWORD(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken1 = null;
    int j = this.text.length();
    int i = 31;
    Token localToken2 = null;
    mID(true);
    localToken2 = this._returnToken;
    i = localToken2.getType();
    if ((_tokenSet_9.member(LA(1))) && (LA(2) >= '\3') && (LA(2) <= 255) && (localToken2.getText().equals("header")))
    {
      if ((_tokenSet_1.member(LA(1))) && (_tokenSet_9.member(LA(2))))
      {
        mWS(false);
      }
      else
      {
        if ((_tokenSet_9.member(LA(1))) && (LA(2) >= '\3') && (LA(2) <= 255))
          break label179:
        throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
      }
      switch (LA(1))
      {
      case '"':
        mSTRING_LITERAL(false);
        break;
      case '\t':
      case '\n':
      case '\r':
      case ' ':
      case '/':
      case '{':
        break;
      default:
        label179: throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
      }
      while (true)
      {
        while (true)
          switch (LA(1))
          {
          case '\t':
          case '\n':
          case '\r':
          case ' ':
            mWS(false);
          case '/':
          }
        mCOMMENT(false);
      }
      mACTION(false);
      i = 5;
    }
    else if ((_tokenSet_10.member(LA(1))) && (LA(2) >= '\3') && (LA(2) <= 255) && (localToken2.getText().equals("tokens")))
    {
      while (true)
      {
        while (true)
          switch (LA(1))
          {
          case '\t':
          case '\n':
          case '\r':
          case ' ':
            mWS(false);
          case '/':
          }
        mCOMMENT(false);
      }
      mCURLY_BLOCK_SCARF(false);
      i = 12;
    }
    else if ((_tokenSet_10.member(LA(1))) && (localToken2.getText().equals("options")))
    {
      while (true)
      {
        while (true)
          switch (LA(1))
          {
          case '\t':
          case '\n':
          case '\r':
          case ' ':
            mWS(false);
          case '/':
          }
        mCOMMENT(false);
      }
      match('{');
      i = 13;
    }
    if ((paramBoolean) && (localToken1 == null) && (i != -1))
    {
      localToken1 = makeToken(i);
      localToken1.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken1;
  }

  protected final void mID(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 9;
    switch (LA(1))
    {
    case 'a':
    case 'b':
    case 'c':
    case 'd':
    case 'e':
    case 'f':
    case 'g':
    case 'h':
    case 'i':
    case 'j':
    case 'k':
    case 'l':
    case 'm':
    case 'n':
    case 'o':
    case 'p':
    case 'q':
    case 'r':
    case 's':
    case 't':
    case 'u':
    case 'v':
    case 'w':
    case 'x':
    case 'y':
    case 'z':
      matchRange('a', 'z');
      break;
    case 'A':
    case 'B':
    case 'C':
    case 'D':
    case 'E':
    case 'F':
    case 'G':
    case 'H':
    case 'I':
    case 'J':
    case 'K':
    case 'L':
    case 'M':
    case 'N':
    case 'O':
    case 'P':
    case 'Q':
    case 'R':
    case 'S':
    case 'T':
    case 'U':
    case 'V':
    case 'W':
    case 'X':
    case 'Y':
    case 'Z':
      matchRange('A', 'Z');
      break;
    case '_':
      match('_');
      break;
    case '[':
    case '\\':
    case ']':
    case '^':
    case '`':
    default:
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    }
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
            switch (LA(1))
            {
            case 'a':
            case 'b':
            case 'c':
            case 'd':
            case 'e':
            case 'f':
            case 'g':
            case 'h':
            case 'i':
            case 'j':
            case 'k':
            case 'l':
            case 'm':
            case 'n':
            case 'o':
            case 'p':
            case 'q':
            case 'r':
            case 's':
            case 't':
            case 'u':
            case 'v':
            case 'w':
            case 'x':
            case 'y':
            case 'z':
              matchRange('a', 'z');
            case 'A':
            case 'B':
            case 'C':
            case 'D':
            case 'E':
            case 'F':
            case 'G':
            case 'H':
            case 'I':
            case 'J':
            case 'K':
            case 'L':
            case 'M':
            case 'N':
            case 'O':
            case 'P':
            case 'Q':
            case 'R':
            case 'S':
            case 'T':
            case 'U':
            case 'V':
            case 'W':
            case 'X':
            case 'Y':
            case 'Z':
            case '_':
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            case ':':
            case ';':
            case '<':
            case '=':
            case '>':
            case '?':
            case '@':
            case '[':
            case '\\':
            case ']':
            case '^':
            case '`':
            }
          matchRange('A', 'Z');
        }
        match('_');
      }
      matchRange('0', '9');
    }
    i = testLiteralsTable(new String(this.text.getBuffer(), j, this.text.length() - j), i);
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  protected final void mCURLY_BLOCK_SCARF(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 32;
    match('{');
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              if (LA(1) == '}')
                break label238:
              if (((LA(1) != '\n') && (LA(1) != '\r')) || (LA(2) < '\3') || (LA(2) > 255))
                break;
              mNEWLINE(false);
            }
            if ((LA(1) != '"') || (LA(2) < '\3') || (LA(2) > 255))
              break;
            mSTRING_LITERAL(false);
          }
          if ((LA(1) != '\'') || (!(_tokenSet_6.member(LA(2)))))
            break;
          mCHAR_LITERAL(false);
        }
        if ((LA(1) != '/') || ((LA(2) != '*') && (LA(2) != '/')))
          break;
        mCOMMENT(false);
      }
      if ((LA(1) < '\3') || (LA(1) > 255) || (LA(2) < '\3') || (LA(2) > 255))
        break;
      matchNot(65535);
    }
    label238: match('}');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mASSIGN_RHS(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 14;
    int k = this.text.length();
    match('=');
    this.text.setLength(k);
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            if (LA(1) == ';')
              break label218:
            if ((LA(1) != '"') || (LA(2) < '\3') || (LA(2) > 255))
              break;
            mSTRING_LITERAL(false);
          }
          if ((LA(1) != '\'') || (!(_tokenSet_6.member(LA(2)))))
            break;
          mCHAR_LITERAL(false);
        }
        if (((LA(1) != '\n') && (LA(1) != '\r')) || (LA(2) < '\3') || (LA(2) > 255))
          break;
        mNEWLINE(false);
      }
      if ((LA(1) < '\3') || (LA(1) > 255) || (LA(2) < '\3') || (LA(2) > 255))
        break;
      matchNot(65535);
    }
    label218: match(';');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  protected final void mSL_COMMENT(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 36;
    match("//");
    while (LA(1) != '\n')
    {
      if (LA(1) == '\r')
        break;
      if ((LA(1) < '\3') || (LA(1) > 255) || (LA(2) < '\3') || (LA(2) > 255))
        break;
      matchNot(65535);
    }
    mNEWLINE(false);
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  protected final void mML_COMMENT(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 37;
    match("/*");
    while (true)
    {
      while (true)
      {
        if ((LA(1) == '*') && (LA(2) == '/'))
          break label140:
        if (((LA(1) != '\n') && (LA(1) != '\r')) || (LA(2) < '\3') || (LA(2) > 255))
          break;
        mNEWLINE(false);
      }
      if ((LA(1) < '\3') || (LA(1) > 255) || (LA(2) < '\3') || (LA(2) > 255))
        break;
      matchNot(65535);
    }
    label140: match("*/");
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  protected final void mESC(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 40;
    match('\\');
    switch (LA(1))
    {
    case 'n':
      match('n');
      break;
    case 'r':
      match('r');
      break;
    case 't':
      match('t');
      break;
    case 'b':
      match('b');
      break;
    case 'f':
      match('f');
      break;
    case 'w':
      match('w');
      break;
    case 'a':
      match('a');
      break;
    case '"':
      match('"');
      break;
    case '\'':
      match('\'');
      break;
    case '\\':
      match('\\');
      break;
    case '0':
    case '1':
    case '2':
    case '3':
      matchRange('0', '3');
      if ((LA(1) >= '0') && (LA(1) <= '9') && (LA(2) >= '\3') && (LA(2) <= 255))
      {
        mDIGIT(false);
        if ((LA(1) >= '0') && (LA(1) <= '9') && (LA(2) >= '\3') && (LA(2) <= 255))
        {
          mDIGIT(false);
          break label633:
        }
        if ((LA(1) >= '\3') && (LA(1) <= 255))
          break label633:
        throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
      }
      if ((LA(1) >= '\3') && (LA(1) <= 255))
        break label633:
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    case '4':
    case '5':
    case '6':
    case '7':
      matchRange('4', '7');
      if ((LA(1) >= '0') && (LA(1) <= '9') && (LA(2) >= '\3') && (LA(2) <= 255))
      {
        mDIGIT(false);
      }
      else
      {
        if ((LA(1) >= '\3') && (LA(1) <= 255))
          break label633:
        throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
      }
    case 'u':
      match('u');
      mXDIGIT(false);
      mXDIGIT(false);
      mXDIGIT(false);
      mXDIGIT(false);
      break;
    default:
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    }
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      label633: localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  protected final void mDIGIT(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 41;
    matchRange('0', '9');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  protected final void mXDIGIT(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 42;
    switch (LA(1))
    {
    case '0':
    case '1':
    case '2':
    case '3':
    case '4':
    case '5':
    case '6':
    case '7':
    case '8':
    case '9':
      matchRange('0', '9');
      break;
    case 'a':
    case 'b':
    case 'c':
    case 'd':
    case 'e':
    case 'f':
      matchRange('a', 'f');
      break;
    case 'A':
    case 'B':
    case 'C':
    case 'D':
    case 'E':
    case 'F':
      matchRange('A', 'F');
      break;
    case ':':
    case ';':
    case '<':
    case '=':
    case '>':
    case '?':
    case '@':
    case 'G':
    case 'H':
    case 'I':
    case 'J':
    case 'K':
    case 'L':
    case 'M':
    case 'N':
    case 'O':
    case 'P':
    case 'Q':
    case 'R':
    case 'S':
    case 'T':
    case 'U':
    case 'V':
    case 'W':
    case 'X':
    case 'Y':
    case 'Z':
    case '[':
    case '\\':
    case ']':
    case '^':
    case '_':
    case '`':
    default:
      throw new NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
    }
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  public final void mARG_ACTION(boolean paramBoolean)
    throws RecognitionException, CharStreamException, TokenStreamException
  {
    Token localToken = null;
    int j = this.text.length();
    int i = 20;
    match('[');
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              if (LA(1) == ']')
                break label238:
              if ((LA(1) != '[') || (LA(2) < '\3') || (LA(2) > 255))
                break;
              mARG_ACTION(false);
            }
            if (((LA(1) != '\n') && (LA(1) != '\r')) || (LA(2) < '\3') || (LA(2) > 255))
              break;
            mNEWLINE(false);
          }
          if ((LA(1) != '\'') || (!(_tokenSet_6.member(LA(2)))))
            break;
          mCHAR_LITERAL(false);
        }
        if ((LA(1) != '"') || (LA(2) < '\3') || (LA(2) > 255))
          break;
        mSTRING_LITERAL(false);
      }
      if ((LA(1) < '\3') || (LA(1) > 255) || (LA(2) < '\3') || (LA(2) > 255))
        break;
      matchNot(65535);
    }
    label238: match(']');
    if ((paramBoolean) && (localToken == null) && (i != -1))
    {
      localToken = makeToken(i);
      localToken.setText(new String(this.text.getBuffer(), j, this.text.length() - j));
    }
    this._returnToken = localToken;
  }

  private static final long[] mk_tokenSet_0()
  {
    long[] arrayOfLong = new long[8];
    arrayOfLong[0] = -576460752303423496L;
    for (int i = 1; i <= 3; ++i)
      arrayOfLong[i] = -1L;
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_1()
  {
    long[] arrayOfLong = { 4294977024L, 0L, 0L, 0L, 0L };
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_2()
  {
    long[] arrayOfLong = new long[8];
    arrayOfLong[0] = -2199023255560L;
    for (int i = 1; i <= 3; ++i)
      arrayOfLong[i] = -1L;
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_3()
  {
    long[] arrayOfLong = new long[8];
    arrayOfLong[0] = -576462951326679048L;
    for (int i = 1; i <= 3; ++i)
      arrayOfLong[i] = -1L;
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_4()
  {
    long[] arrayOfLong = { 4294977024L, 1152921504606846976L, 0L, 0L, 0L };
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_5()
  {
    long[] arrayOfLong = new long[8];
    arrayOfLong[0] = -576605355262354440L;
    arrayOfLong[1] = -576460752303423489L;
    for (int i = 2; i <= 3; ++i)
      arrayOfLong[i] = -1L;
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_6()
  {
    long[] arrayOfLong = new long[8];
    arrayOfLong[0] = -549755813896L;
    for (int i = 1; i <= 3; ++i)
      arrayOfLong[i] = -1L;
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_7()
  {
    long[] arrayOfLong = new long[8];
    arrayOfLong[0] = -17179869192L;
    arrayOfLong[1] = -268435457L;
    for (int i = 2; i <= 3; ++i)
      arrayOfLong[i] = -1L;
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_8()
  {
    long[] arrayOfLong = new long[8];
    arrayOfLong[0] = -549755813896L;
    arrayOfLong[1] = -268435457L;
    for (int i = 2; i <= 3; ++i)
      arrayOfLong[i] = -1L;
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_9()
  {
    long[] arrayOfLong = { 140758963201536L, 576460752303423488L, 0L, 0L, 0L };
    return arrayOfLong;
  }

  private static final long[] mk_tokenSet_10()
  {
    long[] arrayOfLong = { 140741783332352L, 576460752303423488L, 0L, 0L, 0L };
    return arrayOfLong;
  }
}